[Data]
life = 1000
attack = 100
defence = 100
fall.defence_up = 50
liedown.time = 20
airjuggle = 25
sparkno = S6001
guard.sparkno = -1
KO.echo = 0
volume = 0
IntPersistIndex = 0
FloatPersistIndex = 0

[Size]
xscale = 1
yscale = 1
ground.back = 13
ground.front = 13
air.back = 15
air.front = 15
height = 28
attack.dist = 80
proj.attack.dist = 80
proj.doscale = 2
head.pos = -1, -48
mid.pos = -1, -22
shadowoffset = 0
draw.offset = 0,0

[Velocity]
walk.fwd  = 2.4
walk.back = -2.2
run.fwd  = 4.8,-3.6
run.back = -3.8,-3.6
jump.neu = 0,-8.64
jump.back = -2.4
jump.fwd = 2.5
runjump.back = -2,-3.1
runjump.fwd = 2.1,-3.1
airjump.neu = 0
airjump.back = 0
airjump.fwd = 0

[Movement]
airjump.num = 0
airjump.height = 0
yaccel = .44
stand.friction = .85
crouch.friction = .82

[Quotes]
victory1 = "Sorry! But your win was in another fight!"
victory2 = "You need a doctor? I could help you there!"
victory3 = "You won't jump ahead fighting like that!"
victory4 = "You have finally seen the true POWer!"
victory5 = "Ooh, that was some good training!"
victory6 = "I don't have much time to waste anyways!"
victory7 = "You're the Urban Champion? I'm kind of disappointed..."
victory8 = "That was fun! We should battle again sometime!"
victory9 = "I was afraid you were going to be invincible..."
;---------------------------------------------------------------------------
;Var List

;***Universal***
;var(0) = Command variable
;var(1) = Famicom Fighters character detection
;var(2) = First hit counter
;var(3) = Helper select
;var(4) = Victory quote variable
;var(5) = Juggle Count
;var(6) = Helper health
;var(7) = Helper meter
;var(8) = Pause variable
;var(9) = Special move combo condition
;var(10) = Command Detection
;var(20) = Detection for first hit of multi-hit/multi-state moves
;var(21) = Test Var
;var(22) = Identification Variable
;var(23) = Counter for Training Mode Detection
;var(24) = Training Mode Var	  
;var(25) = Death State Check
;var(27) = Test Var
;var(28) = Super Finish
;var(30) = Hide helper bars and move names
;var(31) = Max helper health
;var(32) = Countdown for helper select
;var(33) = Back Charge
;var(34) = Back Charge Ready
;var(35) = Down Charge
;var(36) = Down Charge Ready
;var(37) = Projectile Ready
;var(38) = Helper Ready
;var(39) = Helper Projectile Ready
;var(40) = Air Guard Option
;var(41) = Air Recovery Option
;var(42) = Helpers Option
;var(43) = Pause Option 
;var(44) = Control Scheme
;var(45) = Standalone Helper Bar (X-Position)
;var(46) = Standalone Helper Bar (Y-Position)
;var(47) = Standalone Helper Bar (BG)
;var(48) = Alt Victory Music
;var(50) = Reaction var
;var(51) = Tag team var
;var(52) = Projectile animation var
;var(53) = Assist check
;var(54) = Hyper Tag-In check
;var(55) = AI switch check
;var(58) = Special move command time var
;var(59) = AI Var
;fvar(0) = Helper bars scaling
;fvar(20) = Damage scaling, current power
;fvar(21) = Damage scaling, future power
;fvar(24) = Test Var
;fvar(30) = Special projectile Vel X
;fvar(31) = Special projectile Vel Y
;fvar(32) = Super projectile Vel X
;fvar(33) = Super projectile Vel Y
;fvar(34) = Helper projectile Vel X
;fvar(35) = Helper projectile Vel Y
;fvar(36) = Helper Vel X
;fvar(37) = Helper Vel Y

;***Specific***
;var(11) = Projectile speed variable
;var(12) = Multistomp hit counter
;var(13) = Multistomp hit counter
;var(14) = Guarded Stomp
;var(15) = Hammer Wreck hit
;fvar(10) = Air X-acceleration during air moves
;fvar(11) = Air Y-acceleration during air moves

;***Helpers***
;(Almost?) Universal
;-fvar(1) = Pos X coordinates
;-fvar(2) = Pos Y coordinates
;(EX-Fireball)
;-var(1) = Life
;-var(2) = Combo
;(Podoboo)
;-var(1) = Life
;(Green Fireball)
;-var(1) = Hit detection
;(Boomerang)
;-var(1) = Hit detection

;---------------------------------------------------------------------------
; Lose by Time Over
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0

[State 170, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 170, 2]
type = VelSet
trigger1 = Time = 20
y = -8.72

[State 170, 3]
type = VelAdd
trigger1 = Time >= 20
y = .3488

[State 170, 4]
type = PlaySnd
triggerall = !NumPartner
trigger1 = !Time
value = S11,1

[State 170, 5]
type = PlaySnd
triggerall = NumPartner
trigger1 = (ID = 56 || ID = 58) && !Time
trigger2 = (ID = 57 || ID = 59) && partner,Alive = 0 && !Time
value = S11,1

[State 5400, 6]
type = AssertSpecial
trigger1 = Pos Y <= 250
flag = roundnotover
flag2 = nomusic
flag3 = noshadow
;---------------------------------------------------------------------------
; Win state decider
[Statedef 180]
type = S

[State 180, 1]
type = ChangeState
triggerall = !MatchOver
trigger1 = !Time
value = 181+8*(enemy,Name = "Bonus" && (enemy,Var(0) = 0) && enemy,Var(5) = 0)

[State 180, 2]
type = ChangeState
triggerall = MatchOver
trigger1 = !Time
value = 182+7*(enemy,Name = "Bonus" && (enemy,Var(0) = 0) && enemy,Var(5) = 0)

;---------------------------------------------------------------------------
;Round Win
[Statedef 181]
type = S
ctrl = 0
anim = 180
velset = 0,0

[State 181, 1]
type = PlaySnd
trigger1 = AnimElem = 6
value = S0,1
;---------------------------------------------------------------------------
;Match Win
[Statedef 182]
type = S
ctrl = 0
anim = 181
velset = 0,0

[State 182, 1]
type = AssertSpecial
trigger1 = Time < (0+(330 * (PalNo = 1 || PalNo = 6))+(160 * (PalNo = 2))+(140 * (PalNo = 3))+(210 * (PalNo = 4))+(120 * (PalNo = 5)))
flag = roundnotover

[State 182, 2]
type = AssertSpecial
trigger1 = 1
flag = nomusic

[State 182, 3]
type = Explod
trigger1 = AnimElem = 10
anim = 903
ID = 182
pos = 0,0
postype = p1  ;p2,front,back,left,right
scale = 1*const(size.xscale),1*const(size.yscale)
removetime = -1
sprpriority = 2
shadow = -1
ownpal = 1

[State 182, 4]
type = PlaySnd
triggerall = !NumPartner
trigger1 = !Time
value = S180,Cond(PalNo = 6,1,PalNo-1)

[State 182, 5]
type = PlaySnd
triggerall = NumPartner
trigger1 = (ID = 56 || ID = 58) && !Time 
trigger2 = (ID = 57 || ID = 59) && partner,Alive = 0 && !Time
value = S180,Cond(PalNo = 6,0,PalNo-1)

[State 181, 5]
type = PlaySnd
trigger1 = AnimElem = 12
value = S0,1 
;---------------------------------------------------------------------------
; Introduction
[Statedef 191]
type = S
ctrl = 0
anim = 190
velset = 0,0
sprpriority = 5

[State 191, 1]
type = AssertSpecial
trigger1 = Time < 220
flag = Intro
flag2 = Invisible

[State 191, 2]
type = ScreenBound
trigger1 = 1
value = 0
;***********************************
[State 191, 3]
type = Null
trigger1 = Anim = 190 && Time = 1
x = -250*(Facing)

[State 0, Explod]
type = Explod
trigger1 = Time = 1
anim = 190
ID = 190
pos = ceil(-180*const(size.xscale)),0
postype = P1 
facing = 1
vfacing = 1
bindtime = 1
vel = 2.88*const(size.xscale),0
removetime = 36
scale = const(size.xscale),const(size.yscale)
sprpriority = 3
shadow = -1
ontop = 0
ownpal = 0
removeongethit = 1

[State 0, Helper]
type = Helper
trigger1 = Anim = 190 && !Time
name = "BG Helper" 
ID = 190 
stateno = 192
pos = 0,0
postype = p1
facing = 1
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 191, 1]
type = AssertSpecial
trigger1 = !Time
flag = Invisible

[State 191, 4]
type = PlaySnd
trigger1 = Time = 37
value = S40,0
channel = 1

[State 191, 5]
type = ChangeAnim
trigger1 = Time = 37
value = 191
;***********************************
[State 191, 6]
type = Null
trigger1 = Anim = 191 && !AnimElemTime(1)
y = -8.64

[State 191, 7]
type = Null
trigger1 = Anim = 191 && AnimElemTime(1)
y = .44

[State 191, 8]
type = Null
trigger1 = Anim = 191 &&  AnimElemTime(1) = 3
y = 0

[State 191, 9]
type = Null
trigger1 = Anim = 191 && Vel Y > 0 && Pos Y >= -2
y = 0

[State 191, 10]
type = Null
trigger1 = Anim = 191 &&  AnimElemTime(1) = 14
y = 0

[State 191, 11]
type = Null
trigger1 = Anim = 191 && AnimElemTime(1) = 14
x = 2+(IfElse(facing = -1,-1,0))

[State 191, 12]
type = PlaySnd
trigger1 = Anim = 191 && AnimElemTime(1) = 3
value = S190,0
channel = 1

[State 0, Explod]
type = Explod
trigger1 = Time = 37
anim = 191
ID = 190
pos = ceil(-77*const(size.xscale)),0
postype = P1 
facing = 1
vfacing = 1
bindtime = 1
vel = 2.88*const(size.xscale),-8.64*const(size.yscale)
accel = 0,.44*const(size.yscale)
removetime = 4
scale = const(size.xscale),const(size.yscale)
sprpriority = 3
shadow = -1
ontop = 0
ownpal = 0
removeongethit = 1

[State 0, Explod]
type = Explod
trigger1 = Time = 41
anim = 191
ID = 190
pos = ceil(-66*const(size.xscale)),ceil(-32*const(size.yscale))
postype = P1 
facing = 1
vfacing = 1
bindtime = 1
vel = 2.88*const(size.xscale),0
accel = 0,.44*const(size.yscale)
removetime = 12
scale = const(size.xscale),const(size.yscale)
sprpriority = 3
shadow = -1
ontop = 0
ownpal = 0
removeongethit = 1

[State 191, 13]
type = ChangeAnim
trigger1 = Anim = 191 &&  AnimElemTime(1) = 14
value = 190
;***********************************
[State 191, 14]
type = Null
trigger1 = Time = 62
x = 0
y = 0

[State 0, PosSet]
type = Null
trigger1 = Time = 62 && TeamSide = 1
x = -70

[State 0, PosSet]
type = Null
trigger1 = Time = 62 && TeamSide = 2
x = 70

[State 0, Explod]
type = Explod
trigger1 = Time = 53
anim = 190
ID = 190
pos = ceil(-33*const(size.xscale)),0
postype = P1 
facing = 1
vfacing = 1
bindtime = 1
vel = 2.88*const(size.xscale),0
accel = 0,0
removetime = 12
scale = const(size.xscale),const(size.yscale)
sprpriority = 3
shadow = -1
ontop = 0
ownpal = 0
removeongethit = 1

[State 191, 15]
type = ChangeAnim
trigger1 = Time = 62
value = 192
;***********************************
[State 0, Explod]
type = Explod
trigger1 = Time = 65
anim = 192
ID = 190
pos = 0,0
postype = P1 
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
removetime = 73
scale = const(size.xscale),const(size.yscale)
sprpriority = 3
shadow = -1
ontop = 0
ownpal = 0
removeongethit = 1

[State 191, 16]
type = PlaySnd
trigger1 = Time = 136
value = S190,2
channel = 1

[State 0, Explod]
type = Explod
trigger1 = Time = 136
anim = 193
ID = 190
pos = 0,0
postype = P1 
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
removetime = -2
scale = const(size.xscale),const(size.yscale)
sprpriority = 3
shadow = -1
ontop = 0
ownpal = 0
removeongethit = 1

[State 191, 17]
type = ChangeAnim
trigger1 = Time = 136
value = 193

[State 191, 18]
type = ChangeState
trigger1 = Time = 221
value = 0
;---------------------------------------------------------------------------
; Taunt
[Statedef 192]
type = S
movetype = I
physics = N
ctrl = 0
anim = 1
velset = 0,0
sprpriority = 5

;***********************************
;Block
[State 191, Block 1]
type = Explod
trigger1 = !Time
anim = 900
ID = 191
pos = ceil(-55*const(size.xscale)),ceil(-59*const(size.yscale))
postype = p1
facing = IfElse(Facing = 1,1,-1)
removetime = 39
scale = const(size.xscale),const(size.yscale)
sprpriority = 3
shadow = -1
ontop = 0
ownpal = 1

[State 191, Block 2]
type = Explod
trigger1 = Time = 39
anim = 901
ID = 191
pos = ceil(-55*const(size.xscale)),ceil(-59*const(size.yscale))
postype = p1
facing = IfElse(Facing = 1,1,-1)
vel = 0,-3*const(size.yscale)
accel = 0,.28*const(size.yscale)
removetime = 22
scale = const(size.xscale),const(size.yscale)
sprpriority = 3
shadow = -1
ontop = 0
ownpal = 1

[State 191, Block 3]
type = Explod
trigger1 = Time = 61
anim = 901
ID = 191
pos = ceil(-55*const(size.xscale)),ceil(-59*const(size.yscale))
postype = p1
facing = IfElse(Facing = 1,1,-1)
removetime = -2
scale = const(size.xscale),const(size.yscale)
sprpriority = 3
shadow = -1
ontop = 0
ownpal = 1

[State 191, Block 4]
type = PlaySnd
trigger1 = Time = 39
value = S190,1
channel = 2

;***********************************
[State 191, Mush 1]
type = Explod
trigger1 = Time = 61
anim = 902
ID = 191
pos = ceil(-55*const(size.xscale)),ceil(-67*const(size.yscale))
postype = p1
facing = IfElse(Facing = 1,1,-1)
vel = 0,-.5*const(size.yscale)
removetime = 48
scale = const(size.xscale),const(size.yscale)
sprpriority = 2
shadow = -1
ontop = 0
ownpal = 1

[State 191, Mush 2]
type = Explod
trigger1 = Time = 109
anim = 902
ID = 191
pos = ceil(-55*const(size.xscale)),ceil(-89*const(size.yscale))
postype = p1
vel = 2.2*const(size.xscale),0
facing = IfElse(Facing = 1,1,-1)
removetime = 9
scale = const(size.xscale),const(size.yscale)
sprpriority = 4
shadow = -1
ontop = 0
ownpal = 1

[State 191, Mush 3]
type = Explod
trigger1 = Time = 118
anim = 902
ID = 191
pos = ceil(-35*const(size.xscale)),ceil(-89*const(size.yscale))
postype = p1
vel = 2.2*const(size.xscale),0
accel = 0,.44*const(size.yscale)
facing = IfElse(Facing = 1,1,-1)
removetime = 18
scale = const(size.xscale),const(size.yscale)
sprpriority = 4
shadow = -1
ontop = 0
ownpal = 1
;***********************************
[State 1101, 5]
type = Explod
trigger1 = Time = 135
anim = 909
ID =  1100
pos = 0,ceil(-69*const(size.yscale))
postype = p1
facing = IfElse(Facing = 1,1,-1)
vfacing = 1
bindtime = 1
vel = 0,-3*const(size.yscale)
scale = const(size.xscale),const(size.yscale)
sprpriority = 99
shadow = -1
ownpal = 1

[State 1101, 6]
type = DestroySelf
trigger1 = RoundState = 2

;---------------------------------------------------------------------------
; Taunt
[Statedef 195]
type = S
movetype = I
physics = S
ctrl = 0
anim = 195
velset = 0,0
sprpriority = 2

[State 195, 1]
type = Explod
trigger1 = !Time
anim = 196
ID = 196
pos = 0,0
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1*const(size.xscale),1*const(size.yscale)
sprpriority = 3
ontop = 0
shadow = -1
ownpal = 0
removeongethit = 1

[State 195, 2]
type = Helper
trigger1 = AnimElem = 5
name = "Coin"
ID = 195
stateno = 197
pos = ceil(27*const(size.xscale)),ceil(-44*const(size.yscale))
postype = p1
facing = 1
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 195, 5]
type = PlaySnd
trigger1 = AnimElem = 3
value = S0,0

[State 195, 7]
type = ChangeState
trigger1 = time = 39
value = 196
;---------------------------------------------------------------------------
; Taunt
[Statedef 196]
type = S
movetype = I
physics = S
ctrl = 0
anim = 198
velset = 0,0
sprpriority = 2

[State 195, 7]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Coin
[Statedef 197]
type = A
physics = N
anim = 197
velset = 0,-6.6*const(size.yscale)
sprpriority = 3

[State 197, 1]
type = VelAdd
trigger1 = 1
y = .44*const(size.yscale)

[State 197, 2]
type = ChangeState
trigger1 = parent,StateNo = 196 && ((ParentDist X >= -29*const(size.xscale)) && (ParentDist X <= -23*const(size.xscale)))
trigger1 = Vel Y > 0 && Pos Y >= -39*const(size.yscale)
value = 198

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Vel Y > 0 && Pos Y >= 50
;---------------------------------------------------------------------------
; Coin (Pt. 2)
[Statedef 198]
type = S
physics = N
anim = 199
velset = 0,0
sprpriority = 3

[State 198, 1]
type = BindToParent
trigger1 = 1
time = 1
pos = 0,0

[State 198, 2]
type = PlaySnd
trigger1 = !Time
value = S195,0

[State 198, 2]
type = DestroySelf
trigger1 = AnimTime = 0
;========================<EXPLODSIVE BUFFERING HELPER>=============================
[StateDef 90000005]
type = A
physics = N
moveType = I
anim = 1
velSet = 0,0
ctrl = 0
     
[State 90000005, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "by JustMorphPointman"
ignoreHitPause = 1
;---------------------------------------------------------------------------
; Override common states (use same number to override) :
;---------------------------------------------------------------------------
; Jump Start
[Statedef 40]
type    = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1

[State 40]
Type= ChangeState
Triggerall= !Time
Triggerall= var(59)
trigger1 = (enemy,fvar(30) = 0) || (enemy,fvar(32) = 0)  || (enemy,fvar(34) = 0) 
trigger1 = (enemy,fvar(31) = -999) || (enemy,fvar(33)  = -999) || (enemy,fvar(35) = -999)
trigger1 = (P2MoveType != H) && !(enemynear(0),Pos Y >= -50)
trigger1 = random<var(50)*0.7
value=0
ctrl=1

[State 40, 1]
type = VarSet
trigger1 = !Time
sysvar(1) = 0

[State 40, 2]
type = VarSet
trigger1 = command = "holdfwd"
trigger1 = !var(59)
trigger2 = var(59)
trigger2 = (P2MoveType = H) && enemynear(0),Pos Y < -50
sysvar(1) = 1

[State 40, 3]
type = VarSet
trigger1 = command = "holdback"
trigger1 = !var(59)
trigger2 = var(59)
trigger2 = random>var(50)*0.01
trigger2 = (P2MoveType != H) && !(enemynear(0),Pos Y >= -50)
trigger2 = (enemy,fvar(30) = 0) || (enemy,fvar(32) = 0)  || (enemy,fvar(34) = 0) 
trigger2 = (enemy,fvar(31) = -999) || (enemy,fvar(33)  = -999) || (enemy,fvar(35) = -999)
sysvar(1) = -1

[State 40, 4]
type = VelSet
trigger1 = !AnimTime
x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))*const(size.xscale)
y = const(velocity.jump.y)*const(size.yscale)

[State 40, 5]
type = VelSet
trigger1 = !AnimTime
trigger1 = prevstateno = 100 ;RUN_FWD
trigger1 = sysvar(1) = 1
x = const(velocity.runjump.fwd.x)

[State 40, 6]
type = NotHitBy
trigger1 = 1
value = ,AT
time = 1

[State 40, 7]
type = ChangeState
trigger1 = !AnimTime
value = 50
ctrl = 1
;---------------------------------------------------------------------------
;HIT_DEFEATED
[Statedef 5600]
type    = L
movetype= H
physics = N
sprpriority = -3
velset = 0,0
anim = 5600
ctrl = 0

[State 5400, 1]
type = VelSet
trigger1 = Time = 20
y = -8.72

[State 5400, 2]
type = VelAdd
trigger1 = Time >= 20
y = .3488

[State 5400, 3]
type = PlaySnd
trigger1 = !Time
value = S11,1
channel = 10

[State 5400, 4]
type = ChangeState
trigger1 = Pos Y > 250
value = 5150

[State 5400, 5]
type = AssertSpecial
trigger1 = 1
flag = nomusic
flag2 = noshadow

[State 5400, 6]
type = AssertSpecial
trigger1 = 1
flag = roundnotover
